<template> 
	<view @tap="toDetail" style="width: 100%; height: 180rpx;   display: flex;">
		<view hover-stay-time="50" hover-class="hover" class="flex4 flex">
			<view class="text-center" style="position: relative; border-radius: 10rpx; margin: auto 30rpx; width: 120rpx; height: 120rpx; background-color: #63C3FF;">
				<icon class=" icon icon-my-detail icon-zhufangbutie iconfont"></icon>
				<view v-if="item.isRead == 1" style=" border: #FFFFFF solid 5rpx; width: 20rpx; height: 20rpx; border-radius: 50rpx; position: absolute; top: 0; left: 100%; transform: translate(-70%,-30%); background-color: #DF5000;"></view>
			</view>
			<view style="height: 120rpx; margin: auto 0;"> 
				<view style="line-height: 50rpx;" class="blod">{{ spStr(item.noTitle,0,10,'...')}}</view>
				<view style="line-height: 40rpx; color: #888888;">撰写人：{{ spStr(item.noPubuser,0,10,'...') }}</view>
				<view style="line-height: 40rpx; color: #888888;">发布时间：{{ spStr(item.createTime,0,10,'') }}</view>
			</view>
		</view>
		<view style=" color: #888888; height: 120rpx; margin: auto; font-size: 25rpx;" class="flex1">{{ spStr(item.createTime,0,10)}}</view>
	</view>
</template>
<script>
	export default {
		data() {
			return {

			}
		},
		props:{
			item:{
				
			}
		},
		methods: {
			toDetail(){
				console.log(this.item)
				// uni.navigateTo({
				// 	url:`/pages/index/notice/detail`,
				// 	fail(e) {
				// 		console.log(e)
				// 	}
				// })
				this.$utiltg.navigateTo(`/pages/notice/detail`,`?id=${this.item.noId}`);
			},
			spStr(str,index,howmany,tail=''){
				if(str.length > howmany){
					return str.slice(index,howmany)+tail
				}else{
					return str
				}
			}
		}
	}
</script>
<style scoped>
	.hover {
		transform: scale(0.98); 
		filter: grayscale(18%)
	} 

	.icon {
		font-size: 60rpx;
		line-height: 120rpx;
		font-weight: 800;
		color: #FFFFFF;
	}
</style>
